package com.xxgc.eow.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author Mr.Abel
 * @since 2023-05-08
 */
@Getter
@Setter
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@Schema(name = "Users", description = "用户表")
public class Users implements Serializable {
        private static final long serialVersionUID = 1L;

        @Schema(description = "用户id")
        @TableId(value = "id", type = IdType.AUTO)
        private Long id;

        @Schema(description = "昵称")
        private String nickname;

        @Schema(description = "年龄")
        private Integer age;

        @Schema(description = "性别")
        private Boolean sex;

        @Schema(description = "地址")
        private String address;

        @Schema(description = "头像地址")
        private String profilePhoto;

        @Schema(description = "微信用户唯一id")
        private String openid;

        @Schema(description = "用户名")
        private String username;

        @Schema(description = "密码")
        private String password;

        @Schema(description = "手机号码")
        private String mobile;

        @Schema(description = "小程序id")
        private String appid;

        @Schema(description = "多应用互通id")
        private String unionid;

        @Schema(description = "创建时间")
        @TableField(fill = FieldFill.INSERT)
        private LocalDateTime createTime;

        @Schema(description = "更新时间")
        @TableField(fill = FieldFill.INSERT_UPDATE)
        private LocalDateTime updateTime;
}